import request from '../base.ts';

const url = '/activity-picture';

export const deletePics = (id: string,data: IObj) => {
  return request.delete(`${url}/deleted?_id=${id}`, {
    data
  });
} 

export const uploadPic = (id: string, data: IObj) => {
  return request.post(`${url}/upload?_id=${id}`, data);
}

export const downloadPic = (fileUrl: string) => {
  return request({
    url: `${url}/download`,
    method: 'post',
    params: {
      fileName: fileUrl
    },
    responseType: "blob"
  })
}